<html>
<head>
	<script type="text/javascript">
		var aJaxURL	= "server-side/report/pasiuri.action.php";		//server side folder url
		var tName	= "report";
		var r=new Object();											//table name

		$(document).ready(function () {
			LoadTable();
		    $("#report tbody").on("click", "tr", function () {
		        var nTds = $("td", this);
		            var rID = $(nTds[0]).text();
		            $.getJSON(aJaxURL,"act=chart&id="+rID,function(result){
			            r=result;
	        			 console.log([{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]}]);
	        			 console.log(result.series);
	        			 console.log({ categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',  'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']       });
	        			 console.log(result.xAxis);
		        		$('#container_chart').highcharts({
		        			 xAxis:	 result.xAxis
			        			 ,
		        			 series: result.series

//		        		    xAxis: {
//		        		    },

//		        		    series: [{
//		        		        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
//		        		    }] */

		        		});

		              });


		    });
		});

		function LoadTable(){
			GetDataTable1(tName, aJaxURL, "get_list", 4, '', 0, "", 1, "desc");
		}
	 //   $("#" + tname + " tbody").off("click");


    </script>
</head>

<body>
    <div id="dt_example" class="ex_highlight_row">
        <div id="container" style="width: 90%">
            <div id="dynamic">
            	<h2 align="center">პასიური კლიენტები</h2>
				<br>
				<br/>
				<table style="width: 100%">
				<tr><td>
				<br/> <br/><br/>
				                <table class="display" id="report">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 100%;">კლიენტი</th>
                            <th style="width: 80px;">ბარათების რაოდენობა</th>
                        </tr>
                    </thead>
                </table>

				 </td><td style="width: 70%">
<div id="container_chart"></div>
				  </td> </tr>
				</table>

            </div>
            <div class="spacer">
            </div>
        </div>
    </div>
</body>
</html>